#ifndef _TWITTER_LIST_H_
#define _TWITTER_LIST_H_
#include "resource.h"

NS_BEGIN(Twit)
NS_BEGIN(Resource)
NS_BEGIN(List)

typedef Object<Value::List>     OVList;
typedef Object<Value::Lists>    OVLists;
typedef Object<Value::Statuses> OVStatuses;

/**
* @brief Creates a new list for the authenticated user. Accounts are limited to 20 lists.
*/
class Create:public OVList
{
private:
	__DoNotUse__ bool request(){ return OVList::request(); }
public:
   Create(IOAuth& o);

   /**
   * @param name The name for the list.
   */
   bool request(std::string userName, std::string listName);
   Value::List& get(std::string userName, std::string listName);

   /**
   * @brief 
   *  Whether your list is public or private. Values can be public or private. 
   *  If no mode is specified the list will be public.
   */
   void setMode(bool bPublic);

   /**
   * @brief The description to give the list.
   */
   void setDescription(std::wstring desc);
};

/**
* @brief Updates the specified list.
*/
class Update:public OVList 
{
private:
	__DoNotUse__ bool request(){ return Object<Value::List>::request(); }
public:
   Update(IOAuth& o);
   bool request(std::string userName, Value::UniqueID listId);
   Value::List& get(std::string userName, Value::UniqueID listId);

   /**
   * @brief 
   *  Whether your list is public or private. Values can be public or private. 
   *  If no mode is specified the list will be public.
   */
   void setMode(bool bPublic);

   /**
   * @brief The description to give the list.
   */
   void setDescription(std::wstring desc);

   /**
   * @param listName The name for the list.
   */
   void setName(std::string listName);

};


/**
* @brief List the lists of the specified user. 
*  Private lists will be included if the authenticated users is the same 
*  as the user who's lists are being returned.
*/
class Lists:public OVLists
{
private:
	__DoNotUse__ bool request(){ return Object<Value::Lists>::request(); }
public:
   Lists(IOAuth& o);

   bool request(std::string userName);
   Value::Lists& get(std::string userName);

   /**
   * @brief 
   *  Breaks the results into pages. A single page contains 20 lists. 
   *  Provide a Value of -1 to begin paging. 
   *  Provide values as returned in the response body's next_cursor 
   *  and previous_cursor attributes to page back and forth in the list.
   */
   void setCursor(double cursor);
};

/**
* @brief Show the specified list. Private lists will only be shown 
*  if the authenticated user owns the specified list.
*/
class Show:public OVList
{
private:
	__DoNotUse__ bool request(){ return Object<Value::List>::request(); }
public:
   Show(IOAuth& o);
   bool request(std::string userName, Value::UniqueID listId);
   Value::List& get(std::string userName, Value::UniqueID listId);
   
   /**
   * @param id The id or slug of the list.
   */   
   void setId(std::string id);
};

/**
* @brief Deletes the specified list. Must be owned by the authenticated user.
*/
class Delete:public Show
{
public:
   Delete(IOAuth& o);
};


/**
* @brief Show tweet timeline for members of the specified list.
*/
class Statuses:public OVStatuses
{
private:
	__DoNotUse__ bool request(){ return OVStatuses::request(); }
public:
   Statuses(IOAuth& o);
   bool request(std::string userName, Value::UniqueID listId);
   Value::Statuses& get(std::string userName, Value::UniqueID listId);

   /**
   * @param id
   *  Returns results with an ID greater than (that is, more recent than) the specified ID. 
   *  There are limits to the number of Tweets which can be accessed through the API. 
   *  If the limit of Tweets has occured since the since_id, 
   *  the since_id will be forced to the oldest ID available. 
   */
   void setSinceId(Value::UniqueID id);
   
   /**
   * @param id
   *  Returns results with an ID less than (that is, older than) or equal to the specified ID. 
   */
   void setMaxId(Value::UniqueID id);

   /**
   * @param page
   *  Specifies the page of results to retrieve. 
   */
   void setPerPage(size_t page);

   /**
   * @param page
   *  Specifies the page of results to retrieve. 
   */
   void setPage(size_t page);

   /**
   * @brief 
   *  When set to either true, t or 1, each tweet will include a node called "entities,". 
   *  This node offers a variety of metadata about the tweet in a discreet structure, 
   *  including: user_mentions, urls, and hashtags. While entities are opt-in on timelines at present, 
   *  they will be made a default component of output in the future. 
   *  See Tweet Entities(http://dev.twitter.com/pages/tweet_entities) for more detail on entities.
   */
   void setIncludeEntities(bool bInclude);
};


/**
* @brief List the lists the specified user has been added to.
*/
class Memberships:public OVLists
{
private:
	__DoNotUse__ bool request(){ return OVLists::request(); }
public:
   Memberships(IOAuth& o);
   bool request(std::string screenName);
   Value::Lists& get(std::string screenName);

   /**
   * @brief 
   *  Breaks the results into pages. A single page contains 20 lists. 
   *  Provide a Value of -1 to begin paging. Provide values as returned in the response body's next_cursor 
   *  and previous_cursor attributes to page back and forth in the list.
   */
   void setCursor(double cursor);
};

/**
* @brief List the lists the specified user follows.
*/
class Subscriptions:public OVLists
{
private:
	__DoNotUse__ bool request(){ return OVLists::request(); }
public:
   Subscriptions(IOAuth& o);
   bool request(std::string screenName);
   Value::Lists& get(std::string screenName);

   /**
   * @brief 
   *  Breaks the results into pages. A single page contains 20 lists. 
   *  Provide a Value of -1 to begin paging. Provide values as returned in 
   *  the response body's next_cursor and previous_cursor attributes to page back 
   *  and forth in the list.
   */
   void setCursor(double cursor);
};
NS_END;

DeclareResourceClass(CList)
List::Create      Create;
List::Delete      Delete;
List::Lists       Lists;
List::Memberships Memberships;
List::Show        Show;
List::Statuses    Statuses;
List::Subscriptions  Subscriptions;
List::Update      Update;
EndResourceClass;


NS_END;
NS_END;

#endif /*_TWITTER_LIST_H_*/
